// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:35

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   wc.java

package com.zelix;

import java.io.*;
import java.util.*;

// Referenced classes of package com.zelix:
//            vc, jy, tb

public class wc extends vc
        implements Serializable {

    private boolean g;
    private String h;

    public wc() {
        g = false;
        h = null;
    }

    public static wc a(String s, String s1) {
        File file = new File(s, s1);
        if (file.exists() && !file.isDirectory() && file.canRead())
            try {
                FileInputStream fileinputstream = new FileInputStream(file);
                ObjectInputStream objectinputstream = new ObjectInputStream(fileinputstream);
                wc wc1 = (wc) objectinputstream.readObject();
                wc1.a = true;
                return wc1;
            }
            catch (IOException ioexception) {
            }
            catch (ClassNotFoundException classnotfoundexception) {
            }
            catch (ClassCastException classcastexception) {
            }
            catch (Throwable throwable) {
            }
        return new wc();
    }

    public String h() {
        return h;
    }

    public Enumeration b() {
        return super.f.d();
    }

    public Vector c() {
        Vector vector;
        Enumeration enumeration;
        boolean flag;
        vector = new Vector(super.f.size());
        enumeration = super.f.d();
        while (enumeration.hasMoreElements()) {
            vector.addElement(enumeration.nextElement());
        }
        return vector;
    }

    public boolean i() {
        return g;
    }

    private boolean a(String s) {
        return s != null && s.length() > 0 && s.indexOf("*") == -1 && s.indexOf("^") == -1 && s.charAt(s.length() - 1) == '.';
    }

    public void b(String s, String s1) {
        File file = new File(s, s1);
        if (file.exists() && (file.isDirectory() || !file.canWrite()))
            return;
        try {
            FileOutputStream fileoutputstream = new FileOutputStream(file);
            ObjectOutputStream objectoutputstream = new ObjectOutputStream(fileoutputstream);
            objectoutputstream.writeObject(this);
            super.a = true;
        }
        catch (IOException ioexception) {
        }
    }

    public void a(boolean flag, String s) {
        g = flag;
        h = s;
    }

    public void a(ArrayList arraylist) {
        int j;
        String s;
        boolean flag;
        label0:
        {
            flag = tb.b;
            super.f.clear();
            j = 0;
            s = null;
            for (int k = 0; k < arraylist.size(); k++) {
                String s1 = (String) arraylist.get(k);
                super.f.put(s1, s1);
                if (a(s1) && ++j == 1)
                    s = s1;
            }

            if (super.d == null || super.d.length() <= 0)
                break label0;
            if (super.c) {
                if (super.f.containsKey(super.d))
                    break label0;
                super.c = false;
                if (!flag)
                    break label0;
            }
            if (super.f.containsKey(super.d))
                super.c = true;
        }
        label1:
        {
            if (g) {
                if (super.f.containsKey(h))
                    break label1;
                g = false;
                if (!flag)
                    break label1;
            }
            if (super.f.containsKey(h))
                g = true;
        }
        if (!g && j > 0) {
            g = true;
            h = s;
        }
    }
}